<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:pou="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>GTWorld</title>
        <link href='resources/icon/map_blue.png' rel='shortcut icon' type='image/png'/>
    </h:head>
    <h:body onload="#{sessionController.checkLogin()}">
        <pou:graphicImage value="resources/img/logo_gtworld.png" 
                          style="margin-left: 100px; margin-top: 20px"/>
        <pou:ajaxStatus id="loading" style="display: inline; float: right;
                        margin-right: 200px">
            <f:facet name="start">
                <h:graphicImage value="resources/img/loading_circle.gif" />  
            </f:facet>
            <f:facet name="complete">  
                <h:outputText value="" />  
            </f:facet>  
        </pou:ajaxStatus>

        <pou:separator style="margin-left: 100px; margin-right: 50px"/>


        <h:form> 
            <h:column>
                <pou:graphicImage value="resources/img/slogan.png" 
                                  style="margin-left: 100px; margin-top: 10px"/>
            </h:column>
            <h:column>
                <pou:panel id="login" style="display: inline-block; 
                           position: absolute; margin-left: 100px; margin-top: 100px">
                    <h:outputLabel value="Iniciar Sesión" 
                                   style="font-weight: bolder"/>
                    <br /><br />
                    <h:outputLabel value="Usuario:" />
                    <pou:inputText id="name" style="margin-left: 30px"
                                   value="#{sessionController.idUser}"/>
                    <br /><br />
                    <h:outputLabel value="Contraseña:" />
                    <pou:password id="pass" style="margin-left: 10px"
                                  value="#{sessionController.passUser}"/>
                    <br /><br />
                    <pou:commandButton value="Entrar" update="login"
                                       actionListener="#{sessionController.login}"/>
                   
                    <br />
                    <pou:messages showDetail="false"/>
                </pou:panel>
            </h:column>
        </h:form>
        <h:form>
            <pou:commandLink value="Crear Cuenta" 
                             actionListener="#{sessionController.goRegister}"
                             style="font-family: Verdana; position: inherit;
                             color: darkblue; font-size: 12px; margin-left: 860px"
                             ajax="false"/>
        </h:form>

        <pou:separator style="margin-left: 100px; margin-right: 50px"/>

        <h:form>
            <h:outputLabel value="GTWorld® All Rights Reserved 2012" 
                           style="font-size: 10px; margin-left: 40%; font-family: verdana" />
            <pou:commandLink ajax="false" title="Fan Page" target="blank"
                             actionListener="#{sessionController.goFb}"
                             style="margin-left: 70%">
                <pou:graphicImage value="resources/img/facebook.png"/>
            </pou:commandLink>
            <pou:commandLink ajax="false" title="Follow Us" target="blank"
                             actionListener="#{sessionController.goTwitter}"
                             style="margin-left: 10px">
                <pou:graphicImage value="resources/img/twitter.png"/>
            </pou:commandLink>
            <pou:commandLink ajax="false" title="Ayuda" target="blank"
                             actionListener="#{sessionController.goHelp}"
                             style="margin-left: 25px">
                <pou:graphicImage value="resources/img/help.png"/>
            </pou:commandLink>
        </h:form>
    </h:body>

</html>